Fix next.config parsing failure and add build-safe Next.js web app scaffold#9
Closed
harvatechs wants to merge 1 commit intomainfrom
Closed
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Motivation
Description
web/next.config.jsinto an explicit CommonJS shape, extractedsecurityHeaders, and implemented a standardasync headers()to avoid theSyntaxError: Unexpected token ';'seen in CI.web/lib/env.tsthat parses envs withzod, makes auth and ARIV variables optional at import time, and exposesrequireArivApiBaseUrl()to enforce the backend URL at request time.web/auth.tsthat conditionally registers GitHub/Google providers and injects a disabledCredentialsfallback when no providers are configured so auth can initialize during builds./api/command,/api/config,/api/logs) that forward requests to the ARIV backend viaweb/lib/ariv.ts, plus request validation/sanitization inweb/lib/security.ts, an in-memory rate limiter inweb/lib/rate-limit.ts, middleware for auth + rate limiting inweb/middleware.ts, Type definitions, UI components, pages, styles, and project config files (package.json,tsconfig.json,tailwind.config.ts, etc.).Testing
node -c web/next.config.jsto validate JavaScript syntax of the rewritten config and it passed.cd web && npm installto perform a fullnext build, butnpm installfailed due to an external registry policy error (403 Forbiddenfor@hookform/resolvers), preventing a localnext buildrun.node -cvalidation; full build verification remains blocked by the external npm registry error.Codex Task